/**
 * @file node
 * @author: vscode
 * @date: 2018-10-23 22:27:59
 * @last Modified by: vscode
 * @last Modified time: 2018-10-23 23:53:19
 */

'use strict';

module.exports = (res, code, data, message) => {
    const response = {
        code: code || 200,
        data: data || null,
        message: message || 'success'
    };
    res.send(response);
    res.end();
};
